<?php echo js('admin/settings.js');?>
<?php echo js('jquery/timepicker/jquery.timePicker.min.js');?>
<?php echo css('admin/timepicker/timePicker.css');?>
<script type="text/javascript">
$(function(){
	$("#getin_time").timePicker({
		  startTime: "02.00", // Using string. Can take string or Date object.
		  endTime: new Date(0, 0, 0, 15, 30, 0), // Using Date object here.
		  show24Hours: false,
		  separator: '.',
		  step: 15});
});
</script>  
<div id="page-heading"><h1><?php echo sprintf(lang('pickuppoints.edit_title'), def_lang($pickuppoint, 'name', CURRENT_LANGUAGE))?></h1></div>
<?php $this->load->view('partials/notices'); ?>
<form method="post" action="<?php echo site_url('admin/catalog/edit_pickuppoint/'. $pickuppoint->id);?>" >
<table border="0" cellpadding="0" cellspacing="0"  id="id-form">
		<tr>
			<th valign="top"><?php echo lang('pickuppoints.visible_label'); ?>:</th>
			<td><?php echo form_dropdown('visible', array(1 => lang('global:yes'), 0 => lang('global:no')), $pickuppoint->visible, 'id="visible" class="select_box"'); ?></td>
		</tr>
		<tr>
			<th valign="top"><?php echo lang('pickuppoints.city_id'); ?><span class="require">*</span>:</th>
			<?php 
			$cities_option = array();
			foreach($cities as $city){
				$cities_option[$city->id] = empty($city->name)? lang('global:empty'): $city->name;
			}
			?>
			<td><?php echo form_dropdown('city_id', $cities_option, $pickuppoint->city_id, 'id="city_id" class="select_box"'); ?></td>
		</tr>
		<tr>
			<th valign="top"><?php echo lang('pickuppoints.latitude'); ?>:</th>
			<td><?php echo form_input('latitude', $pickuppoint->latitude, 'class="inp-form"'); ?></td>
		</tr>
		<tr>
			<th valign="top"><?php echo lang('pickuppoints.longitude'); ?>:</th>
			<td><?php echo form_input('longitude', $pickuppoint->longitude, 'class="inp-form"'); ?></td>
		</tr>
		<tr>
			<th valign="top"><?php echo lang('pickuppoints.getin_time'); ?><span class="require">*</span>:</th>
			<td><?php echo form_input('getin_time', $pickuppoint->getin_time, 'id="getin_time"  class="inp-form"'); ?></td>
		</tr>
		<tr>
			<th valign="top"><?php echo lang('global:sort'); ?>:</th>
			<td><?php echo form_input('sort', $pickuppoint->sort, 'class="inp-form"'); ?></td>
		</tr>
		<tr>
			<th valign="top"><?php echo lang('pickuppoints.address'); ?>:</th>
			<td><?php echo form_textarea('address', $pickuppoint->address, 'class="form-textarea"'); ?></td>
		</tr>
</table>	
<table border="0" cellpadding="0" cellspacing="0"  id="id-form" style="width:100%;">
		<tr>
			<th colspan="3">
			<div id="usual-tab" class="usual-tab">
				<ul class="idTabs"> 
					<?php foreach($supported_languages as $lang => $content): ?>
						<li><a href="#<?php echo $lang;?>"><span style="font-weight: bold; font-size:12px;"><?php echo $content['name'];?></span></a></li>
					<?php endforeach; ?>
				</ul>
				<?php foreach($supported_languages as $lang => $content): ?>
					<div id="<?php echo $lang;?>" class="lang_content">
						<fieldset>
							<table border="0" cellpadding="0" cellspacing="0"  id="id-form" style="width:100%;">
							<tr>
								<th valign="top"><?php echo lang('pickuppoints.name_label'); ?><span class="require">*</span>:</th>
								<td><?php echo form_input('name_'. $lang, def_lang($pickuppoint, 'name', $lang), 'class="inp-form"'); ?></td>
							</tr>
							</table>
						</fieldset>	
					</div> 
				<?php endforeach; ?> 
			</div> 
			</th>
		</tr>
	<tr>
		<th>&nbsp;</th>
		<td valign="top">
			<input type="submit" value="" class="form-submit" />
			<input type="reset" value="" class="form-reset"  />
		</td>
		<td></td>
	</tr>
	</table>
<input type="hidden" name="id" value="<?php echo $pickuppoint->id?>"/>	
</form>	
